import http from './request';

// 秒杀活动列表/flash/list
const flashList = (params:FlashListParams):PRES<flashObject> => http.get('/flash/list',{params})


//添加活动 /flash/create
const flashCreate = (params:flashList):PRES<flashList>=>http.post(`/flash/create`,params)

//活动详情 /flash/{id}
const flashId = (id:number): PRES<flashList> => http.get(`/flash/${id}`);


//剪辑活动 /flash/update/{id}
const flashUpdate = (params:flashList):PRES<any>=>http.post(`/flash/update/${params.id}`,params)

//删除活动 /flash/delete/{id}
const flashDelete = (idn:number[]):PRES<flashList>=>http.post(`/flash/delete/${idn}`)

//
export{
    flashList,
    flashCreate,
    flashId,
    flashUpdate,
    flashDelete
}